//
// Created by Wirano on 2020/11/9.
//

#ifndef ANO_PORT_ANO_FLYCTRL_H
#define ANO_PORT_ANO_FLYCTRL_H

#include "stm32f4xx.h"
typedef struct
{
	//sta
	uint8_t state_ok;
	uint8_t cmd_state[2];
	//time
	uint32_t fb_process_t_ms[4];
	uint32_t exp_process_t_ms[4];
	
	//ctrl
	float ref_dir[2];
	float vel_cmps_ref[3];
	float vel_cmps_w[3];
	float vel_cmps_h[3];
	int16_t yaw_pal_dps;
	
}_fly_ct_st;
extern _fly_ct_st program_ctrl;


//static
void FlyCtrlReset(void);

//public
void FlyCtrlDataAnl(uint8_t *data);
void FlyCtrl_Task(uint8_t dT_ms);

#endif //ANO_PORT_ANO_FLYCTRL_H
